<html class="desktop landscape">
<head>
	<title>输入账号</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
	<link href="/static/api/yuyue/css/am_min.css" rel="stylesheet" type="text/css">
	<link href="/static/api/yuyue/css/page_min.css" rel="stylesheet" type="text/css">
	<link href="/static/api/yuyue/css/black.css" rel="stylesheet" type="text/css">
</head>
<body class="theme1">



	<div class="am-widthLimite am-touchable" style="">
		<div class="am-app" style="transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);">

			<div class="am-page page_setup" id="page_setup" style="transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);display:block;">
				<div class="setup_form" id="setup_loginForm" style="margin-top:30%;">
					<div class="login_header">
						<div class="logo" > <img src="/static/api/yuyue/image/logo.png" style="margin:0 auto" /> </div>
						<p style="color:#e43c59;margin-top:0.6rem">帐号登录</p>
					</div>
					<form name="login">
						<div class="page_input">
							<input id="tel"  autofocus="autofocus" placeholder="请输入手机号" class="tel" maxlength="11" value="" type="tel">
						</div>

						<div class="page_input">
							<input id="name" placeholder="请输入姓名" class="name" minlength="2" maxlength="4" value="" type="text">
						</div>

						<input type='hidden' name="user_id" id='user_id' value="{{user_id}}">
					</form>
					<form name="smscode">
						<div  class="page_button blue submit login_sendCode am-clickable" style="" onclick="next()">下一步</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</body>
<script type='text/javascript'>
function next() {
	var user_id = document.getElementById('user_id').value;
	var sMobile = document.getElementById("tel").value;
	var sName = document.getElementById("name").value;

	var isPhone = checkMobile(sMobile);
	var isChart = checkName(sName);

	if (isPhone && isChart) {
		//匹配成功
		window.location.href = "/wxfen/wxfen/choosetime.html?user_id="+user_id+"&sMobile="+sMobile+"&sName="+sName;
	}
}

//手机号码验证
function checkMobile(str) {
	var sj_reg = /^0?1[3|4|5|7|8][0-9]\d{8}$/;
	if (sj_reg.test(str)) {

		return true;
	} else {
		alert("手机号格式不正确！");

		return false;
	}
}

//姓名验证
function checkName(str) {
	var name1_reg = /^[\u4e00-\u9fa5]{2,4}$/;

	if (name1_reg.test(str)) {

		return true;
	} else {
		alert("姓名格式不正确！");
		return false;
	}
}
</script>
</html>
